const db = require('../../db/db.js')
const { sqlTableList } = require('../../db/sqlTableList.js')


exports.createMysqlTable = function () {
  sqlTableList.map(sqlItem => {
    // Mysql创建数据表的创建查询
    db.query(sqlItem.sql, (err, results, fields) => {
      if (err) {
        console.error(sqlItem.name + '创建失败: ' + err.stack);
        return;
      }
      console.log(sqlItem.name + '创建成功');
    });
  })
}